//
//  UIView+SSAddition.m
//
//  Created by Esther on 2016/12/10.
//  Copyright © 2016年 Esther. All rights reserved.
//

#import "UIView+SSAddition.h"

@implementation UIView (SSAddition)

#pragma mark -
#pragma mark - 返回视图截图
- (UIImage *)SSSnapshotImage {

    UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0);
    
    [self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES];
    
    UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
    
    UIGraphicsEndImageContext();
    
    return result;
}

@end
